import { createRouter, createWebHistory } from 'vue-router'
import TenantManage from "../views/TenantManage";
import Login from "../views/Login"
import Layout from "../components/layoutsE/Layout";
import GroupManage from "../views/GroupManage";
import SurveyList from "../views/SurveyList";
import UserManage from "../views/UserManage";
import ShareSurvey from "../views/ShareSurvey";
import register from "@/views/register";
import DesignQuestionnaire from "@/views/DesignQuestionnaire";
import PreviewQuestionnaire from "@/views/PreviewQuestionnaire";
import EditQuestionnaire from "@/views/EditQuestionnaire";
import carousel from "@/components/carousel";
import MyInfo from "@/views/MyInfo";
import PythonScreen1 from "@/views/PythonScreen1";
import PythonScreen2 from "@/views/PythonScreen2";
const routes = [
  {
    path: '/',
    meta:'首页',
    component:carousel,
    children:[
      {
        path: '/',
        redirect:'/carousel'
      }]
  },
  {
    path: '/DesignQuestionnaire',
    name: 'DesignQuestionnaire',
    component: DesignQuestionnaire
  },
  {
    path: '/MyInfo',
    name: 'MyInfo',
    component: MyInfo
  },
  {
    path: '/Survey/PythonScreen2',
    name: 'PythonScreen2',
    component: PythonScreen2
  },
  {
    path: '/Survey/PythonScreen1',
    name: 'PythonScreen1',
    component: PythonScreen1
  },
  {
    path: '/PreviewQuestionnaire',
    name: 'PreviewQuestionnaire',
    component: PreviewQuestionnaire
  },
  {
    path: '/EditQuestionnaire',
    name: 'EditQuestionnaire',
    component: EditQuestionnaire,
  },
  {
    path: '/Login',
    name:'Login',
    component: Login
  },
  {
    path: '/carousel',
    name:'carousel',
    component: carousel
  },
  {
    path:'/register',
    component: register
  },
  {
    path:'/survey',
    mate:'首页',
    component: Layout,
    children: [
      {
        path: "/survey/TenantManage",
        name:'TenantManage',
        component:TenantManage
      },{
        path: "/survey/GroupManage",
        name:"GroupManage",
        component: GroupManage
      },{
        path: "/survey/UserManage",
        name:'UserManage',
        component:UserManage
      },
      {
          path:'/survey/SurveyList',
          name:'SurveyList',
          component:SurveyList
      },{
        path:'/survey/ShareSurvey',
        name:'ShareSurvey',
        component:ShareSurvey
      }
    ]
  }


]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
